﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterNhanSuTienLuong.Master" Inherits="System.Web.Mvc.ViewPage<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.ChamCongModel.BangChamCongForm>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/ChamCong/BangChamCong.js") %>"></script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <div class="box">
        <%--<div class="title">
            <h5>Bảng Chấm Công</h5>
        </div>--%>
        
        <div class="breadcrumbs">
            <ul>
                <li class="home"><a href="">Quản Lý Chấm Công</a></li>
                <li>Bảng Chấm Công</li>
            </ul>
        </div>
        <div class="headlines">
            <h2>
                <span>Bảng Chấm Công</span>
            </h2>
        </div>
        
        <div class="box-content formBox">
            <table class="table_outsite" style="width: 100%;">
                <tr>
                    <td colspan="2">
                        <div id="MessageSuccess" class="MessageSuccess" style="font-size: 12px; color: Blue; font-weight: bold">
                            <%=Model.MessageSuccess%>
                        </div>
                        <div id="MessageError" class="MessageError" style="font-size: 12px; color: Red; font-weight: bold">
                            <%=Model.MessageError%>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left">
                    
                        <div style="display: inline;">
                            Bảng chấm công năm:
                        </div>
                        <%: Html.DropDownList("Nam", Model.SelectListNam) %>
                    </td>
                    <td align="right">
                        <div class="btn-submit" style="border-top: none; margin-bottom: 3px;">
                            <input type="button" class="button" id="btnTaoBangChamCong" value="Tạo Bảng Chấm Công" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table class="tab tab-drag">
                            <thead>
                                <tr class="title">
                                    <td class="first" align="center">
                                        STT
                                    </td>
                                    <td nowrap="nowrap">
                                        <strong>Tháng</strong>
                                    </td>
                                    <td nowrap="nowrap">
                                        <strong>Người lập biểu</strong>
                                    </td>
                                    <td nowrap="nowrap">
                                        <strong>Người ký</strong>
                                    </td>
                                    <td nowrap="nowrap" style="width: 80px;">
                                        <strong>Ngày ký</strong>
                                    </td>
                                    <td nowrap="nowrap" style="width: 40px;">
                                        <strong>Khóa</strong>
                                    </td>
                                    <td nowrap="nowrap" style="width: 80px;">
                                        <strong>Hoàn thành</strong>
                                    </td>
                                    <td nowrap="nowrap" class="last" style="width: 100px;">
                                        <strong>&nbsp;</strong>
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
                                <% 
                                    int stt = (Model.Pagenumber - 1) * DTTB.Common.CommonVariables.PaggedItemsPerPage + 1;
                                    foreach (var item in Model.ListBangChamCong)
                                    {
                                %>
                                <tr class="item_row">
                                    <td align="center" class="first">
                                        <%= stt %>
                                    </td>
                                    <td style="text-align: center; width: 60px;">
                                        <a href="/ChamCong/SuaBangChamCong/<%= item.Id %>" title="Xem thông tin Bảng Chấm Công tháng <%= item.Thang.ToString("#0") %>/<%= item.Nam %>"><%= item.Thang %></a>
                                    </td>
                                    <td nowrap="nowrap">
                                        <span>
                                            <%= item.HoTenNguoiLapBieu %>
                                        </span>
                                    </td>
                                    <td nowrap="nowrap">
                                        <span >
                                            <%= item.HoTenNguoiKy %>
                                        </span>
                                    </td>
                                    <td nowrap="nowrap" style="text-align: center;">
                                        <span >
                                            <%= item.NgayKy %>
                                        </span>
                                    </td>
                                    <td style="text-align: center;">
                                            <% if (item.IsLock)
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/lock.png" height="16" width="16" alt="True"/>
                                                <%}
                                                else
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/unlock.png" height="16" width="16" alt="True"/>
                                                <%} %>
                                    </td>
                                    <td style="text-align: center;">
                                            <% if (item.IsFinish)
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/finished.png" height="16" width="16" alt="True"/>
                                                <%}
                                                else
                                                {%>
                                        <img src="/Content/ImagesAdmin/icons/unfinished.png" height="16" width="16" alt="True"/>
                                                <%} %>
                                    </td>
                                
                                    <td class="last" style="text-align: center;">
                                        <a href="<%= ResolveUrl("~/ChamCong/TongHopChamCong") %>?thang=<%= item.Thang %>&nam=<%= item.Nam %>" title="Xem tổng hợp dữ liệu chấm công tháng <%= item.Thang.ToString("0#") %>/<%= item.Nam %>">Xem chấm công</a>
                                    </td>
                                </tr>
                                <%
                                stt++;}
                                %>
                            </tbody>
                            <tfoot>
                                <tr class="border_bottom">
                                    <td class="first" style="background: #DDDDDD">
                                    </td>
                                    <td class="last" colspan="7" align="right" style="background: #DDDDDD; padding-right: 10px">
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>

</asp:Content>
